<div class="portlet">
    <div class="portlet-actions">
        <button class="btn blue btn-sm" ng-click="grid.add()"><i class="fa fa-plus"></i> 新增</button>
    </div>
    <form class="portlet-search-body" name="queryForm">
        <input type="text" class="form-control search-item" ng-model="groupName" placeholder="制作组名称">
        <div class="search-item">
            <button class="btn btn-icon-only default"><i class="fa fa-chevron-right"></i></button>
            <button class="btn btn-sm query" ng-click="grid.query();"><i class="fa fa-search"></i> 查询</button>
            <button class="btn btn-sm reset" ng-click="grid.reset();"><i class="fa fa-eraser"></i> 重置</button>
        </div>
    </form>
    <div class="portlet-body">
        <table ed-grid="grid"  class="table table-striped table-bordered table-advance table-hover"
               data-options="url: 'employeeGroup/query.do', modelText: '制作组列表', form: 'queryForm', modal: 'modal'">
            <thead>
            <tr>
                <th data-options="field: '_index'"></th>
                <th data-options="field: 'groupName'">名称</th>
                <th data-options="field: 'groupDetails | groupDetails | to_trusted'">制作组成员</th>
                <th style="width: 120px;">操作</th>
            </tr>
            </thead>
        </table>
    </div>
</div>

<div ed-modal="modal" data-options="title: '制作组', static: true, width: 720, defaultButton:false,onHidden:'reset'">
    <form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate name="validateForm">
        <div class="form-body">
			<div class="form-group">
				<label class="col-md-4 control-label">制作组名称</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="groupName" ng-model="employeeGroup.groupName" required>
				</div>
			</div>
        </div>
        <div class="form-actions">
            <button type="button" class="btn default" ng-click="grid.cancel();">
                <i class="fa fa-times"></i> 取消
            </button>
            <button type="button" class="btn blue" ng-click="grid.save();">
                <i class="fa fa-times"></i> 确定
            </button>
        </div>
    </form>
</div>


<div ed-modal="addMemberModal" data-options="title: '组员编辑', static: true, width: 720, defaultButton:false,onHidden:'cancelMemberModal'">
    <form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate name="memberValidateForm">
        <div class="form-body">
            <i ng-show="updateFlag" class="glyphicon glyphicon-trash delete" ng-click="deleteMember(groupMember)"></i>
            <div class="form-group">
                <label class="col-md-4 control-label">组员名称</label>
                <div class="col-md-4">
                    <div ed-combotree name="member"
                         data-options="idField: 'id', textField: 'name', parentIdField: 'parentId'"
                         ng-model="groupMember.id" ed-selectable="selectable(data)" ed-data="empList" required></div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-4 control-label">是否组长</label>
                <div class="col-md-4">
                    <select class="form-control" name="leaderFlag" ng-model="groupMember.leaderFlag"
                            ng-options="opt.value as opt.name for opt in options.group_leader" required></select>
                </div>
            </div>
        </div>
        <div class="form-actions">
            <button type="button" class="btn default" ng-click="addMemberModalObj.cancel()">
                <i class="fa fa-times"></i> 取消
            </button>
            <button type="button" class="btn blue" ng-click="addMemberModalObj.save();">
                <i class="fa fa-times"></i> 确定
            </button>
        </div>
    </form>
</div>
